package vip.xiaonuo.modular.business.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.core.pojo.response.ResponseData;
import vip.xiaonuo.core.pojo.response.SuccessResponseData;
import vip.xiaonuo.modular.business.service.StoreInformationService;
import vip.xiaonuo.modular.manage.bioperateddata.param.BiOperatedDataParam;

import javax.annotation.Resource;

/**
 * @Author: liu
 * @Date:2022/9/7
 */
@Api(tags = "门店信息")
@RestController
public class StoreInformationController {
    @Resource
    private StoreInformationService storeInformationService;

    @ApiOperation("门店信息列表查询")
    @PostMapping("/business/store/list")
    public ResponseData page(@RequestBody BiOperatedDataParam param){
        return new SuccessResponseData(storeInformationService.page(param));
    }

    @PostMapping("/business/store/listNoPage")
    public ResponseData listNoPage(@RequestBody BiOperatedDataParam param){
        return new SuccessResponseData(storeInformationService.listNoPage(param));
    }

    /**
     * 店铺周边信息
     * @param param
     * @return
     */
    @PostMapping("/business/store/storeAroundInfo")
    public ResponseData storeAroundInfo(@RequestBody BiOperatedDataParam param){
        return new SuccessResponseData(storeInformationService.storeAroundInfo(param));
    }
}
